package models

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	OrderId int `gorm:"type:int;comment:'订单id'"`
	ShopId  int `gorm:"type:int;comment:'商品id'"`
	UserId  int `gorm:"type:int;comment:'用户Id'"`
	Status  int `gorm:"type:int;comment:'订单状态 1 取消 2 未取消'"`
}

func (od *Order) Createorder(db *gorm.DB) error {
	err := db.Create(&od).Error
	return err
}
